import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopFailedJobController } from '../../../controllers';
const uctoominishopFailedJobRouter = new Router();
const minishopFailedJobController = new uctooMinishopFailedJobController();

uctoominishopFailedJobRouter.post('/add', requireUser, minishopFailedJobController.add);
uctoominishopFailedJobRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_failed_job'), minishopFailedJobController.edit);
uctoominishopFailedJobRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_failed_job'), minishopFailedJobController.delete);

//For getting minishopFailedJob with permission control
uctoominishopFailedJobRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_failed_job'), minishopFailedJobController.getSingle);
uctoominishopFailedJobRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_failed_job'), minishopFailedJobController.getMany);
uctoominishopFailedJobRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_failed_job'), minishopFailedJobController.getMany);

//#endregion AutoCreateCode
export default uctoominishopFailedJobRouter;
